import matplotlib.pyplot as plt
from geotiff_tools import *
from config import *
import numpy as np

import  math

def threslope():
    slope = read_tiff("{}/slope.tif".format(terrainDir))
    # slope = slope * 180 / math.pi
    print("max and min of slope:", np.max(slope), np.min(slope))
    # slope[slope > 60] = 1
    # slope[slope < 60] = 0
    plt.figure(figsize=(30, 30), dpi=90)

    #plt.subplot(131)
    plt.imshow(slope, cmap ='gray')
    plt.show()

if __name__ == '__main__':
    threslope()